<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ page import="jman.mode.Vote" %>
<%@ page import="jman.service.UserService" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>投票情况</title>
</head>
<body>
<form action="ChooseVote">
<input type="submit" value="查看投票请求">
<%
List<Vote> voteList=new ArrayList<Vote>();
UserService us=new UserService();
voteList=(List<Vote>)request.getAttribute("voteList");
%>
</form>
<h3>参加过的投票</h3>
<table border="1">
<tr>
<th>发起人</th>
<th>标题</th>
<th>结果</th>
<th>发起投票时间</th>
</tr>
<%
for(int i=0;i<voteList.size();++i){
%>
<tr>
<td><%= us.getName(voteList.get(i).getRaise_UserId()) %></td>
<td><%= voteList.get(i).getTitle() %></td>
<td><%= voteList.get(i).getResult() %></td>
<td><%= voteList.get(i).getCreat_Time() %></td>
</tr>
<%
}
%>
</table>
</body>
</html>